package com.pw.lit.service.impl;

import com.pw.lit.bean.Comment;
import com.pw.lit.bean.CommentExample;
import com.pw.lit.mapper.CommentMapper;
import com.pw.lit.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("commentService")
public class CommentServiceImpl implements CommentService {

    @Autowired
    private CommentMapper commentMapper;

    @Override
    public int countByExample(CommentExample example) {
        return commentMapper.countByExample(example);
    }

    @Override
    public int deleteByExample(CommentExample example) {
        return commentMapper.deleteByExample(example);
    }

    @Override
    public int deleteByPrimaryKey(Integer cid) {
        return commentMapper.deleteByPrimaryKey(cid);
    }

    @Override
    public int insert(Comment record) {
        return commentMapper.insert(record);
    }

    @Override
    public int insertSelective(Comment record) {
        return commentMapper.insertSelective(record);
    }

    @Override
    public List<Comment> selectByExample(CommentExample example) {
        return commentMapper.selectByExample(example);
    }

    @Override
    public Comment selectByPrimaryKey(Integer cid) {
        return commentMapper.selectByPrimaryKey(cid);
    }

    @Override
    public int updateByExampleSelective(Comment record, CommentExample example) {
        return commentMapper.updateByExampleSelective(record,example);
    }

    @Override
    public int updateByExample(Comment record, CommentExample example) {

        return commentMapper.updateByExample(record,example);
    }

    @Override
    public int updateByPrimaryKeySelective(Comment record) {
        return commentMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Comment record) {

        return commentMapper.updateByPrimaryKey(record);
    }
}